package com.irain.pp.account.service.redis;

import com.irain.pp.account.service.dto.LoginInfo;
import com.irain.pp.account.repository.enums.VerifyCodeType;
import com.irain.pp.account.service.dto.VerifyCodeInfo;

/**
 * @author WangYanPeng
 * @date 2017/11/14 17:01
 */
public interface PpUserRedisDao {

    /**
     * 保存H5cookie
     * @param cookie
     * @param loginInfo
     * @param expire
     */
    void saveH5Cookie(String cookie, LoginInfo loginInfo, long expire);

    /**
     * 根据cookie获取登录信息
     * @param cookie
     * @return
     */
    LoginInfo getH5Cookie(String cookie);
    /**
     * 保存redis手机号对应验证码
     * @param codeType
     * @param mobile
     * @param verifyCodeInfo
     * @param expire
     */
    void saveVerifyCode(VerifyCodeType codeType, String mobile, VerifyCodeInfo verifyCodeInfo, long expire);

    /**
     * 获取手机号对应验证码
     * @param codeType
     * @param mobile
     * @return
     */
    VerifyCodeInfo getVerifyCode(VerifyCodeType codeType, String mobile);
}
